<template>

  <div>
    <ul class="mui-table-view">
      <li class="mui-table-view-cell mui-media" v-for="item in newslist" :key="item.id">
        <router-link :to="'/home/newsinfo/' + item.id" class="">
          <img class="mui-media-object mui-pull-left" :src="item.src">
          <div class="mui-media-body">
            <h3>{{item.title}}</h3>
            <p class="mui-ellipsis">
              <span>发表时间：{{item.update_time|dateFormat('YYYY-MM-DD HH:mm')}}</span>
              <span>点击：{{item.pv}}</span>
            </p>
          </div>
        </router-link>
      </li>
    </ul>
  </div>
  
</template>

<script>

    import { Toast } from 'mint-ui'

    export default {

        data(){
            return {

                newslist: [{"id":"1062060","original_url":"http:\/\/wechat.shwilling.com\/","title":"\u6ce8\u610f\uff01\u4e00\u6ce2\u201c00\u540e\u201d\u65b0\u751f\u6b63\u5728\u9760\u8fd1\uff01\u4ed6\u4eec\u5df2\u6210\u4e3a18\u7ea7\u65b0\u751f\u4e3b\u529b\u519b","pv":3906,"date":"2018-08-28","update_time":"2018-08-28 13:34:14","src":"http:\/\/shwilling.ufile.ucloud.com.cn\/uploads\/ueditor\/image\/20180828\/1535434252968732.jpg","name":"\u5b8b\u5a67\u5a67","badge":"http:\/\/wechat.shwilling.com\/img\/scheduler.jpg","comment":"10"},{"id":"1062057","original_url":"http:\/\/wechat.shwilling.com\/","title":"\u98ce\u5b50 | \u5341\u516b\u5c81\u5f00\u59cb\u6d41\u6d6a\u7684\u4eba\uff0c\u7528\u97f3\u4e50\u8868\u8fbe\u751f\u6d3b","pv":19719,"date":"2018-08-27","update_time":"2018-08-25 09:11:30","src":"http:\/\/shwilling.ufile.ucloud.com.cn\/uploads\/ueditor\/image\/20180825\/1535158749458165.jpg","name":"\u5085\u83ca\u8339","badge":"http:\/\/wechat.shwilling.com\/img\/scheduler.jpg","comment":"3"},{"id":"1062053","original_url":"http:\/\/wechat.shwilling.com\/","title":"\u4ea4\u5927\u535a\u58eb\u592b\u59bb\u6012\u603c\u90ed\u5fb7\u7eb2\uff0c\u7f51\u53cb\uff1a\u522b\u79c0\u5b66\u5386\u4e86\uff0c\u5148\u5b66\u5b66\u8bf4\u8bdd\uff01","pv":9555,"date":"2018-08-22","update_time":"2018-08-22 13:21:33","src":"http:\/\/shwilling.ufile.ucloud.com.cn\/uploads\/ueditor\/image\/20180822\/1534910642247035.jpg","name":"\u95eb\u6587\u5a1f","badge":"http:\/\/wechat.shwilling.com\/img\/scheduler.jpg","comment":"25"},{"id":"1062050","original_url":"http:\/\/wechat.shwilling.com\/","title":"95\u540e\u5e73\u57477\u4e2a\u6708\u5c31\u79bb\u804c\uff1f\u4ed6\u4eec\u7adf\u6700\u770b\u91cd\u81ea\u6211\u4ef7\u503c\u7684\u5b9e\u73b0\uff01","pv":2751,"date":"2018-08-15","update_time":"2018-08-14 13:57:28","src":"http:\/\/shwilling.ufile.ucloud.com.cn\/uploads\/ueditor\/image\/20180814\/1534226213774486.jpg","name":"\u5b8b\u5a67\u5a67","badge":"http:\/\/wechat.shwilling.com\/img\/scheduler.jpg","comment":"1"},{"id":"1062047","original_url":"http:\/\/wechat.shwilling.com\/","title":"\u626c\u5927\u8001\u5e08\u5e03\u7f6e560\u591a\u4e07\u5b57\u624b\u6284\u7e41\u4f53\u5b57  \u4e3b\u6d41\u5a92\u4f53\u548c\u7f51\u53cb\u5435\u7ffb\u5929\u2026\u2026","pv":27577,"date":"2018-07-30","update_time":"2018-08-09 16:00:05","src":"http:\/\/shwilling.ufile.ucloud.com.cn\/uploads\/ueditor\/image\/20180808\/1533704020661311.jpg","name":"\u8d75\u8d8a","badge":"http:\/\/wechat.shwilling.com\/img\/scheduler.jpg","comment":"3"},{"id":"1062046","original_url":"http:\/\/wechat.shwilling.com\/","title":"\u9632\u6b62\u8d2b\u56f0\u751f\u56e0\u5bb6\u5ead\u56f0\u96be\u800c\u5931\u5b66\uff0c\u8fd9\u4e24\u4e2a\u53f7\u7801\u4f60\u5fc5\u987b\u8981\u77e5\u9053\uff01","pv":7623,"date":"2018-07-29","update_time":"2018-07-27 22:44:51","src":"http:\/\/shwilling.ufile.ucloud.com.cn\/uploads\/ueditor\/image\/20180727\/1532697779779635.jpg","name":"\u95eb\u6587\u5a1f","badge":"http:\/\/wechat.shwilling.com\/img\/scheduler.jpg","comment":"1"},{"id":"1062045","original_url":"http:\/\/wechat.shwilling.com\/","title":"\u6587\u7406\u79d1\u6536\u5165\u5dee\u8ddd\u9ad8\u8fbe1.7\u500d\uff01\u8d77\u56e0\u7adf\u6e90\u81ea\u5efa\u56fd\u521d\u2026\u2026","pv":17985,"date":"2018-07-25","update_time":"2018-08-09 16:12:48","src":"http:\/\/shwilling.ufile.ucloud.com.cn\/uploads\/ueditor\/image\/20180724\/1532427909459371.jpg","name":"\u8d75\u8d8a","badge":"http:\/\/wechat.shwilling.com\/img\/scheduler.jpg","comment":"1"},{"id":"1062044","original_url":"http:\/\/wechat.shwilling.com\/","title":"\u4e2d\u56fd\u5927\u5b66\u751f\u5b9e\u4e60\u5927\u6570\u636e\u5206\u6790\u62a5\u544a\uff0c\u534a\u6570\u516c\u53f8\u4e0d\u613f\u7ed9IT\u884c\u4e1a\u5b9e\u4e60\u751f\u85aa\u916c","pv":36982,"date":"2018-07-25","update_time":"2018-07-27 19:35:04","src":"http:\/\/shwilling.ufile.ucloud.com.cn\/uploads\/ueditor\/image\/20180723\/1532344239878897.jpg","name":"\u5f90\u6587","badge":"http:\/\/wechat.shwilling.com\/img\/scheduler.jpg","comment":"1"},{"id":"1062042","original_url":"http:\/\/wechat.shwilling.com\/","title":"2018\u4e16\u754c\u4e00\u6d41\u5b66\u79d1\u6392\u540d\u53d1\u5e03\uff01\u4e2d\u56fd\u5185\u5730\u9ad8\u6821\u62a2\u53608\u4e2a\u5b66\u79d1\u4e16\u754c\u7b2c\u4e00\uff01","pv":2856,"date":"2018-07-21","update_time":"2018-07-19 12:09:36","src":"http:\/\/shwilling.ufile.ucloud.com.cn\/uploads\/ueditor\/image\/20180719\/1531972960846073.jpg","name":"\u5b8b\u5a67\u5a67","badge":"http:\/\/wechat.shwilling.com\/img\/scheduler.jpg","comment":"0"},{"id":"1062041","original_url":"http:\/\/wechat.shwilling.com\/","title":"2018\u5927\u5b66\u751f\u5c31\u4e1a\u62a5\u544a \u672a\u5c31\u4e1a\u4eba\u7fa4\u4e2d\u8fd1\u534a\u6570\u4ecd\u5728\u6c42\u804c","pv":2709,"date":"2018-07-18","update_time":"2018-07-21 20:11:39","src":"http:\/\/shwilling.ufile.ucloud.com.cn\/uploads\/ueditor\/image\/20180718\/1531913254576772.jpg","name":"\u5f90\u6587","badge":"http:\/\/wechat.shwilling.com\/img\/scheduler.jpg","comment":"4"}]

                // newslist: [
                //     {
                //         id: 1,
                //         title: '超级大乐透开奖！',
                //         img_url: 'http://thirdwx.qlogo.cn/mmopen/kf4ErfVsHuNfrbGjibEZmRg6ST8uVu7FecJe3h28apsaGwqY6RZ69SZSawRcGMMe9B2ElLVSBKmRA4F3Ujpo94LeCZseQR0OW/132',
                //         click: 1,
                //         add_time: new Date()
                //     },
                //
                //     {
                //         id: 2,
                //         title: 'NBA',
                //         img_url: 'http://thirdwx.qlogo.cn/mmopen/kf4ErfVsHuNfrbGjibEZmRg6ST8uVu7FecJe3h28apsaGwqY6RZ69SZSawRcGMMe9B2ElLVSBKmRA4F3Ujpo94LeCZseQR0OW/132',
                //         click: 2,
                //         add_time: new Date()
                //     },
                //
                //     {
                //         id: 3,
                //         title: '王者荣耀',
                //         img_url: 'http://thirdwx.qlogo.cn/mmopen/l9ibK7icnEm9pibxNAr0libhOq5zhTNtUaHQjXy8sShiaBBUcaqWMd9MRkJ6CqTwjeVVAWNj2lJgF9Z57MauibSUM6nQ/132',
                //         click: 3,
                //         add_time: new Date()
                //     },
                //
                //     {
                //         id: 4,
                //         title: '王燕',
                //         img_url: 'http://thirdwx.qlogo.cn/mmopen/kf4ErfVsHuNfrbGjibEZmRg6ST8uVu7FecJe3h28apsaGwqY6RZ69SZSawRcGMMe9B2ElLVSBKmRA4F3Ujpo94LeCZseQR0OW/132',
                //         click: 1,
                //         add_time: new Date()
                //     },
                //
                //     {
                //         id: 5,
                //         title: '木屋',
                //         img_url: 'http://thirdwx.qlogo.cn/mmopen/l9ibK7icnEm9pibxNAr0libhOq5zhTNtUaHQjXy8sShiaBBUcaqWMd9MRkJ6CqTwjeVVAWNj2lJgF9Z57MauibSUM6nQ/132',
                //         click: 5,
                //         add_time: new Date()
                //     },
                //
                //     {
                //         id: 6,
                //         title: '幸福！',
                //         img_url: 'http://thirdwx.qlogo.cn/mmopen/kf4ErfVsHuNfrbGjibEZmRg6ST8uVu7FecJe3h28apsaGwqY6RZ69SZSawRcGMMe9B2ElLVSBKmRA4F3Ujpo94LeCZseQR0OW/132',
                //         click: 1,
                //         add_time: new Date()
                //     },
                //
                //     {
                //         id: 7,
                //         title: 'CRD',
                //         img_url: 'http://thirdwx.qlogo.cn/mmopen/kf4ErfVsHuNfrbGjibEZmRg6ST8uVu7FecJe3h28apsaGwqY6RZ69SZSawRcGMMe9B2ElLVSBKmRA4F3Ujpo94LeCZseQR0OW/132',
                //         click: 1,
                //         add_time: new Date()
                //     },
                //
                //     {
                //         id: 8,
                //         title: 'LOL',
                //         img_url: 'http://thirdwx.qlogo.cn/mmopen/l9ibK7icnEm9pibxNAr0libhOq5zhTNtUaHQjXy8sShiaBBUcaqWMd9MRkJ6CqTwjeVVAWNj2lJgF9Z57MauibSUM6nQ/132',
                //         click: 1,
                //         add_time: new Date()
                //     },
                //
                //     {
                //         id: 9,
                //         title: '在一起',
                //         img_url: 'http://thirdwx.qlogo.cn/mmopen/kf4ErfVsHuNfrbGjibEZmRg6ST8uVu7FecJe3h28apsaGwqY6RZ69SZSawRcGMMe9B2ElLVSBKmRA4F3Ujpo94LeCZseQR0OW/132',
                //         click: 1,
                //         add_time: new Date()
                //     },
                //
                //     {
                //         id: 10,
                //         title: '超级大乐透',
                //         img_url: 'http://thirdwx.qlogo.cn/mmopen/kf4ErfVsHuNfrbGjibEZmRg6ST8uVu7FecJe3h28apsaGwqY6RZ69SZSawRcGMMe9B2ElLVSBKmRA4F3Ujpo94LeCZseQR0OW/132',
                //         click: 1,
                //         add_time: new Date()
                //     },
                //
                //
                // ]
            }
        },
        created(){
            // this.getNewsList()
        },

        methods:{

            getNewsList(){

                Toast({
                    message: "加载中...",
                    duration: -1, // 如果是 -1 则弹出之后不消失
                    position: "middle",
                    iconClass: "mui-spinner", // 设置 图标的类
                    className: "mytoast" // 自定义Toast的样式，需要自己提供一个类名
                });

                this.$http.get(
                    "http://wechat-dev.shwilling.com/zone/detail",
                {
                    params:{
                        live_id : 238,
                        content_id  : 0,
                        num: 0
                    },
                    responseType: 'json'
                }

                ).then(res => {

                    console.log(res);
                })
            }
        }
    }
</script>

<style scoped lang="less">


  .mui-table-view{
    li{
      h3{font-size: 14px;}
      .mui-ellipsis{
        font-size: 12px;
        color:#226aff;
        display: flex;
        justify-content: space-between;
      }

    }
  }


</style>